package ua.khpi.si.kit49.diploma.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import ua.khpi.si.kit49.diploma.db.dao.RoadQualityDAO;
import ua.khpi.si.kit49.diploma.db.dto.RoadQuality;

/**
 * Implementation of road quality service
 * 
 * @author netstalk3r
 * 
 */

@Service("roadQualityService")
public class RoadQualityServiceImpl implements RoadQualityService {

	public RoadQualityServiceImpl() {
		super();
	}

	@Autowired(required = true)
	private RoadQualityDAO roadQualityDAO;

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
	public RoadQuality getRoadQualityById(Integer id) {
		return roadQualityDAO.getRoadQualityById(id);
	}

}
